import request from '@/utils/request'
export function gettreeJson(data: any) {
  return request({
    url: '/Base_Company/TreeJson',
    method: 'post',
    data,
  })
}
export function getstoreData(data: any) {
  return request({
    url: '/Wms_WareHouse/GetPageData',
    method: 'post',
    data,
  })
}
export function getareaData(data: any) {
  return request({
    url: '/Wms_WareHouse_Area/GetPageData',
    method: 'post',
    data,
  })
}

export function getList(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/GetPageData',
    method: 'post',
    data,
  })
}
export function getwhsinfo(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/getwhsinfo',
    method: 'post',
    data,
  })
}
export function doEdit(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/savewhs',
    method: 'post',
    data,
  })
}

export function doDelete(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/delwhs',
    method: 'post',
    data,
  })
}

// 货架下载

export function Wms_WareHouse_ShelfDown(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/DownLoadTemplate',
    method: 'get',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
  })
}

// 货架导出

export function Wms_WareHouse_ShelfExport(data: any) {
  return request({
    url: '/Wms_WareHouse_Shelf/Export',
    method: 'post',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
    data,
  })
}
